//
//  WHUserManager.h
//  BinFengExpressOwner
//
//  Created by 邓伟浩 on 2018/10/23.
//  Copyright © 2018年 BinFeng. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "WHDetailUserInfo.h"
#import "WHBankModel.h"

typedef void (^loginBlock)(BOOL success, NSString *description);

#define userManager [WHUserManager sharedWHUserManager]

@interface WHUserManager : NSObject

//单例
SINGLETON_FOR_HEADER(WHUserManager)

/** 详细用户信息 */
@property (nonatomic, strong) WHDetailUserInfo *detailUserInfo;

@property (nonatomic, assign) BOOL isLogined;

/** 账号登录 */
- (void)doAccountLoginWithPhoneNumber:(NSString *)phoneNumber password:(NSString *)password completion:(loginBlock)completion;

- (BOOL)loadUserInfo;
- (void)saveUserInfo;

/** 退出登录 */
- (void)logout:(loginBlock)completion;

/** 取消网络请求 */
- (void)cancelRequest;

@property (nonatomic, strong) WHBankModel *bankModel;
@property (nonatomic, copy) NSString *balance;

@property (nonatomic, assign) BOOL hasRequest; // 有申请

- (void)defaultSetting;

@end
